import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  all: '/erp_meixingtiyu/MemberCard/all',
  add: '/erp_meixingtiyu/MemberCard/add',
  del: '/erp_meixingtiyu/MemberCard/delete',
  edit: '/erp_meixingtiyu/MemberCard/edit',
  orderList: '/erp_meixingtiyu/MemberCard/orderList',
  orderListFilter: '/erp_meixingtiyu/MemberCard/orderListFilter',
}

/**
 * 会员卡列表
 */
export function all (params) {
  return axios({
    url: api.all,
    method: 'get',
    params
  })
}

/**
 * 添加会员卡
 */
export function add (params) {
  return axios({
    url: api.add,
    method: 'get',
    params
  })
}

/**
 * 删除会员卡
 */
 export function del (params) {
  return axios({
    url: api.del,
    method: 'get',
    params
  })
}

/**
 * 编辑会员卡
 */
 export function edit (params) {
  return axios({
    url: api.edit,
    method: 'get',
    params
  })
}

/**
 * 会员卡订单列表
 */
 export function orderList (params) {
  return axios({
    url: api.orderList,
    method: 'get',
    params
  })
}

/**
 * 根据日期范围会员卡订单列表
 */
 export function orderListFilter (params) {
  return axios({
    url: api.orderListFilter,
    method: 'get',
    params
  })
}